﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ComeSeeThis_MVC2.Models
{
    public class SearchFormView
    {
        public Vehicle Vehicle { get; private set; }
        public SelectList Motors { get; private set; }
        public SelectList Companies { get; private set; }
        public int CompanyId { get; private set; }

        public SearchFormView()
        {
            //Vehicle = new VehicleRepository().GetVehicle(vehicleId);
            Motors = new SelectList(new MotorRepository().GetMotorsThatHaveFdrs(Vehicle.VehicleTypeId), "MotorId", "MotorName");
            Companies = new SelectList(new CompanyRepository().GetAllCompanies(1, ProductType.Motor, false), "CompanyId", "CompanyName");

        }
    }
}